<?php

namespace App\Http\Controllers\OpenShop\Merchant;

use App\Http\Controllers\BaseController;
use App\Http\Validate\OpenShop\Renew\RenewValidate;
use App\Service\Renew\RenewOrderService;
use Exception;
use Illuminate\Http\JsonResponse;
use Illuminate\Validation\ValidationException;
use Psr\Container\ContainerExceptionInterface;
use Psr\Container\NotFoundExceptionInterface;

class ExpireShopController extends BaseController
{

    /**
     * @return JsonResponse
     * @throws ValidationException
     */
    public function pendingRenewOrderMsg(): JsonResponse
    {
        return $this->success(RenewOrderService::pendingRenewOrderMsg());
    }

    /**
     * 续签提醒 - 工作台顶部聚合统计数据
     *
     * @return JsonResponse
     */
    public function renewWorkOrderGroup(): JsonResponse
    {
        return $this->success(RenewOrderService::renewWorkOrderGroup());
    }


    /**
     * 续签提醒 - 续签工单列表
     *
     * @return JsonResponse
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     * @throws ValidationException
     */
    public function renewWorkOrderGroupList(): JsonResponse
    {
        return $this->success(RenewOrderService::renewWorkOrderGroupList(RenewValidate::renewWorkOrderGroupListValidate()));
    }


    /**
     * 续签流程 - 工作台顶部聚合统计数据
     *
     * @return JsonResponse
     */
    public function renewWorkOrderFlowGroup(): JsonResponse
    {
        return $this->success(RenewOrderService::renewWorkOrderFlowGroup());
    }


    /**
     * 续签流程 - 续签工单列表
     *
     * @return JsonResponse
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     * @throws ValidationException
     */
    public function renewWorkOrderFlowGroupList(): JsonResponse
    {
        return $this->success(RenewOrderService::renewWorkOrderFlowGroupList(RenewValidate::renewWorkOrderFlowGroupListValidate()));
    }

    /**
     * 续签 - 工单列表
     *
     * @return JsonResponse
     * @throws ContainerExceptionInterface
     * @throws NotFoundExceptionInterface
     * @throws ValidationException
     */
    public function renewWorkOrderList(): JsonResponse
    {
        return $this->success(RenewOrderService::renewWorkOrderList(RenewValidate::renewWorkOrderListValidate()));
    }
}
